package com.hjl.spring6.bean.iocXml.factorybean;

import org.junit.jupiter.api.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @author ServivE
 * @version 0.1
 * @className TestFactoryBean
 * @description
 * @date 2024/8/6 17:11
 * @since jdk11
 */
public class TestFactoryBean {
    @Test
    public void testUserFactoryBean(){
        //获取IOC容器
        ApplicationContext ac = new ClassPathXmlApplicationContext("factorybean.xml");
        User user = (User) ac.getBean("user");
        System.out.println(user);
    }
}
